using System;
using System.Windows.Forms;
namespace NoteManger
{
	public abstract class DataBaseObject
	{
		protected bool _Connected = false;
		protected string _Message = string.Empty;
		public bool Connected
		{
			get
			{
				return this._Connected;
			}
		}
		public string Message
		{
			get
			{
				return this._Message;
			}
		}
		public static Array ChangeArrayLength(Array oriArray, int Row, int Col)
		{
			Type elementType = oriArray.GetType().GetElementType();
			Array array = Array.CreateInstance(elementType, Row, Col);
			Array.Copy(oriArray, 0, array, 0, Math.Min(oriArray.Length, Row * Col));
			return array;
		}
		public abstract bool Connect(string mdbFilePath);
		public abstract bool Connect(string aServerName, string aUserName, string aPassword, string aDataBaseName);
		public abstract bool Connect(string aDataSource, string aUserName, string aPassword);
		public abstract void DisConnect();
		public abstract string[,] Open(string aStrSql);
		public abstract void Open(string aStrSql, DataGridView objDataGridView);
		public abstract int ExecSQL(string aStrSql);
	}
}
